<!doctype html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  
    
      
    

    
  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic|PT Mono:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/blog/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Hexo, NexT" />








  <link rel="shortcut icon" type="image/x-icon" href="/blog/favicon.ico?v=5.1.0" />






<meta name="description" content="小思">
<meta property="og:type" content="website">
<meta property="og:title" content="XiaoSi">
<meta property="og:url" content="https://rsl140.github.io/blog/page/2/index.html">
<meta property="og:site_name" content="XiaoSi">
<meta property="og:description" content="小思">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="XiaoSi">
<meta name="twitter:description" content="小思">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Muse',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://rsl140.github.io/blog/page/2/"/>





  <title> XiaoSi </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  














  
  
    
  

  <div class="container sidebar-position-left 
   page-home 
 ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">XiaoSi</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/blog/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/blog/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            
  <section id="posts" class="posts-expand">
    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://rsl140.github.io/blog/blog/2017/09/06/ECM6初探/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Summer">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/uploads/1.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="XiaoSi">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/blog/2017/09/06/ECM6初探/" itemprop="url">
                  ECM6初探
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-09-06T14:50:54+08:00">
                2017-09-06
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/FE/" itemprop="url" rel="index">
                    <span itemprop="name">FE</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/blog/2017/09/06/ECM6初探/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count" data-disqus-identifier="2017/09/06/ECM6初探/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>ECM6学习总结 <a href="http://es6.ruanyifeng.com/#docs/let">ECMAScript 6 入门</a></p>
</blockquote>
<h1 id="let"><a href="#let" class="headerlink" title="let"></a>let</h1><ol>
<li><p>声明变量用，类似var.只在代码块内有效.</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line">&#123;</div><div class="line">  <span class="keyword">let</span> a = <span class="number">10</span>;</div><div class="line">  <span class="keyword">var</span> b = <span class="number">1</span>;</div><div class="line">&#125;</div><div class="line"></div><div class="line">a <span class="comment">// ReferenceError: a is not defined.</span></div><div class="line">b <span class="comment">// 1</span></div></pre></td></tr></table></figure>
</li>
<li><p>不存在变量提升，声明变量一定要再声明后使用否则会报错</p>
</li>
<li><p>暂时性死区（temporal dead zone，简称 TDZ）</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">if</span> (<span class="literal">true</span>) &#123;</div><div class="line">  <span class="comment">// TDZ开始</span></div><div class="line">  tmp = <span class="string">'abc'</span>; <span class="comment">// ReferenceError</span></div><div class="line">  <span class="built_in">console</span>.log(tmp); <span class="comment">// ReferenceError</span></div><div class="line"></div><div class="line">  <span class="keyword">let</span> tmp; <span class="comment">// TDZ结束</span></div><div class="line">  <span class="built_in">console</span>.log(tmp); <span class="comment">// undefined</span></div><div class="line"></div><div class="line">  tmp = <span class="number">123</span>;</div><div class="line">  <span class="built_in">console</span>.log(tmp); <span class="comment">// 123</span></div><div class="line">&#125;</div></pre></td></tr></table></figure>
</li>
<li><p>不允许在<span style="color: red;">相同作用域</span>内，重复声明同一个变量</p>
          <!--noindex-->
          <div class="post-button text-center">
            <a class="btn" href="/blog/2017/09/06/ECM6初探/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://rsl140.github.io/blog/blog/2017/09/03/node/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Summer">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/uploads/1.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="XiaoSi">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/blog/2017/09/03/node/" itemprop="url">
                  node,npm
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-09-03T16:51:01+08:00">
                2017-09-03
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/blog/2017/09/03/node/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count" data-disqus-identifier="2017/09/03/node/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>有关node等的记录</p>
</blockquote>
<h1 id="npm-ERR-cb-never-called-错误"><a href="#npm-ERR-cb-never-called-错误" class="headerlink" title="npm ERR! cb() never called!错误"></a>npm ERR! cb() never called!错误</h1><p>在谷歌上搜索过 尝试过更新到新版。。 依然一直报never called错误 ，最后实在没办法了，尝试从官网从新下载node稳定版安装后 再次使用npm install 正常运行.. </p>
<p>#npm下载过慢<br>如果模块下载很慢可以在后面 空格加上淘宝的镜像<br>–registry=<a href="https://registry.npm.taobao.org">https://registry.npm.taobao.org</a><br>
          <!--noindex-->
          <div class="post-button text-center">
            <a class="btn" href="/blog/2017/09/03/node/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://rsl140.github.io/blog/blog/2017/08/21/Jsp/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Summer">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/uploads/1.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="XiaoSi">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/blog/2017/08/21/Jsp/" itemprop="url">
                  Jsp学习记录
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-08-21T11:46:06+08:00">
                2017-08-21
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/blog/2017/08/21/Jsp/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count" data-disqus-identifier="2017/08/21/Jsp/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>Jsp学习笔记</p>
</blockquote>
<h1 id="JSP-页面元素"><a href="#JSP-页面元素" class="headerlink" title="JSP 页面元素"></a>JSP 页面元素</h1><ul>
<li>静态内容 HTML静态文本</li>
<li>指令 以”<a href="&#x6d;&#x61;&#x69;&#108;&#116;&#111;&#58;&#37;&#64;&#x22;&#x5f00;&#22987;&#65292;&#20197;&#34;&#x25;&#x22;&#34;">&#37;&#64;&#x22;&#x5f00;&#22987;&#65292;&#20197;&#34;&#x25;&#x22;&#34;</a>结束</li>
<li>小脚本 &lt;%java代码 %&gt;</li>
<li>表达式 &lt;%=java表达式 %&gt;</li>
<li>声明 &lt;%! 方法%&gt;</li>
<li>注释 <code>&lt;!--客户端可以查看到--&gt;</code>,<code>&lt;%--客户端不能查看到--%&gt;</code>
          <!--noindex-->
          <div class="post-button text-center">
            <a class="btn" href="/blog/2017/08/21/Jsp/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://rsl140.github.io/blog/blog/2017/08/02/sql/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Summer">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/uploads/1.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="XiaoSi">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/blog/2017/08/02/sql/" itemprop="url">
                  mysql总结
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-08-02T20:16:46+08:00">
                2017-08-02
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/sql/" itemprop="url" rel="index">
                    <span itemprop="name">sql</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/blog/2017/08/02/sql/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count" data-disqus-identifier="2017/08/02/sql/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>mysql数据库总结</p>
</blockquote>
<h1 id="sql的组成"><a href="#sql的组成" class="headerlink" title="sql的组成"></a>sql的组成</h1><h2 id="数据定义语言（DDL），用来定义和管理数据对象，如数据库、表等"><a href="#数据定义语言（DDL），用来定义和管理数据对象，如数据库、表等" class="headerlink" title="数据定义语言（DDL），用来定义和管理数据对象，如数据库、表等"></a>数据定义语言（DDL），用来定义和管理数据对象，如数据库、表等</h2><p><code>create、drop、alter</code></p>
<h2 id="数据操作语言（DML），用于操作数据库对象中包含的数据"><a href="#数据操作语言（DML），用于操作数据库对象中包含的数据" class="headerlink" title="数据操作语言（DML），用于操作数据库对象中包含的数据"></a>数据操作语言（DML），用于操作数据库对象中包含的数据</h2><p><code>insert、update、delete</code></p>
<h2 id="数据查询语言（DQL），用于查询数据库"><a href="#数据查询语言（DQL），用于查询数据库" class="headerlink" title="数据查询语言（DQL），用于查询数据库"></a>数据查询语言（DQL），用于查询数据库</h2><p><code>select</code></p>
<h2 id="数据控制语言（DCL），用来管理数据库，包括管理权限和数据更改"><a href="#数据控制语言（DCL），用来管理数据库，包括管理权限和数据更改" class="headerlink" title="数据控制语言（DCL），用来管理数据库，包括管理权限和数据更改"></a>数据控制语言（DCL），用来管理数据库，包括管理权限和数据更改</h2><p><code>grant、commit、rollback</code></p>
<h1 id="数据库-database-管理"><a href="#数据库-database-管理" class="headerlink" title="数据库(database)管理"></a>数据库(database)管理</h1><h2 id="创建数据库"><a href="#创建数据库" class="headerlink" title="创建数据库"></a>创建数据库</h2><figure class="highlight sql"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">create</span> <span class="keyword">database</span> 表名;</div></pre></td></tr></table></figure>
          <!--noindex-->
          <div class="post-button text-center">
            <a class="btn" href="/blog/2017/08/02/sql/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://rsl140.github.io/blog/blog/2017/07/11/zj/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Summer">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/uploads/1.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="XiaoSi">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/blog/2017/07/11/zj/" itemprop="url">
                  css常用样式||知识点
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-07-11T08:36:32+08:00">
                2017-07-11
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/FE/" itemprop="url" rel="index">
                    <span itemprop="name">FE</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/blog/2017/07/11/zj/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count" data-disqus-identifier="2017/07/11/zj/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>常用样式整理</p>
</blockquote>
<h1 id="居中div"><a href="#居中div" class="headerlink" title="居中div"></a>居中div</h1><ul>
<li>水平居中：给div设置一个宽度，然后添加margin:0 auto属性</li>
</ul>
<figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line"><span class="selector-tag">div</span>&#123;</div><div class="line">   <span class="attribute">width</span>:<span class="number">200px</span>;</div><div class="line">   <span class="attribute">margin</span>:<span class="number">0</span> auto;</div><div class="line"> &#125;</div></pre></td></tr></table></figure>
<ul>
<li>让绝对定位的div居中</li>
</ul>
<figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line"><span class="selector-tag">div</span> &#123;</div><div class="line">   <span class="attribute">position</span>: absolute;</div><div class="line">   <span class="attribute">width</span>: <span class="number">300px</span>;</div><div class="line">   <span class="attribute">height</span>: <span class="number">300px</span>;</div><div class="line">   <span class="attribute">margin</span>: auto;</div><div class="line">   <span class="attribute">top</span>: <span class="number">0</span>;</div><div class="line">   <span class="attribute">left</span>: <span class="number">0</span>;</div><div class="line">   <span class="attribute">bottom</span>: <span class="number">0</span>;</div><div class="line">   <span class="attribute">right</span>: <span class="number">0</span>;</div><div class="line">   <span class="attribute">background-color</span>: pink; <span class="comment">/* 方便看效果 */</span></div><div class="line">&#125;</div></pre></td></tr></table></figure>
<ul>
<li>水平垂直居中一</li>
</ul>
<figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line">确定容器的宽高</div><div class="line"> <span class="selector-tag">div</span> &#123;</div><div class="line">    <span class="attribute">position</span>: relative;     <span class="comment">/* 相对定位或绝对定位均可 */</span></div><div class="line">    <span class="attribute">width</span>:<span class="number">500px</span>;</div><div class="line">    <span class="attribute">height</span>:<span class="number">300px</span>;</div><div class="line">    <span class="attribute">top</span>: <span class="number">50%</span>;</div><div class="line">    <span class="attribute">left</span>: <span class="number">50%</span>;</div><div class="line">    <span class="attribute">margin</span>: -<span class="number">150px</span> <span class="number">0</span> <span class="number">0</span> -<span class="number">250px</span>;      <span class="comment">/* 外边距为自身宽高的一半 */</span></div><div class="line">    <span class="attribute">background-color</span>: pink;     <span class="comment">/* 方便看效果 */</span></div><div class="line"></div><div class="line">  &#125;</div></pre></td></tr></table></figure>
<ul>
<li>水平垂直居中二</li>
</ul>
<figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div></pre></td><td class="code"><pre><div class="line">未知容器的宽高，利用 `<span class="selector-tag">transform</span>` 属性</div><div class="line"></div><div class="line"><span class="selector-tag">div</span> &#123;</div><div class="line">   <span class="attribute">position</span>: absolute;     <span class="comment">/* 相对定位或绝对定位均可 */</span></div><div class="line">   <span class="attribute">width</span>:<span class="number">500px</span>;</div><div class="line">   <span class="attribute">height</span>:<span class="number">300px</span>;</div><div class="line">   <span class="attribute">top</span>: <span class="number">50%</span>;</div><div class="line">   <span class="attribute">left</span>: <span class="number">50%</span>;</div><div class="line">   <span class="attribute">transform</span>: <span class="built_in">translate</span>(-50%, -50%);</div><div class="line">   <span class="attribute">background-color</span>: pink;     <span class="comment">/* 方便看效果 */</span></div><div class="line"></div><div class="line">&#125;</div></pre></td></tr></table></figure>
<ul>
<li>水平垂直居中三</li>
</ul>
<figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div></pre></td><td class="code"><pre><div class="line">利用 <span class="selector-tag">flex</span> 布局</div><div class="line">实际使用时应考虑兼容性</div><div class="line"></div><div class="line"><span class="selector-class">.container</span> &#123;</div><div class="line">   <span class="attribute">display</span>: flex;</div><div class="line">   <span class="attribute">align-items</span>: center;        <span class="comment">/* 垂直居中 */</span></div><div class="line">   <span class="attribute">justify-content</span>: center;    <span class="comment">/* 水平居中 */</span></div><div class="line"></div><div class="line">&#125;</div><div class="line"><span class="selector-class">.container</span> <span class="selector-tag">div</span> &#123;</div><div class="line">   <span class="attribute">width</span>: <span class="number">100px</span>;</div><div class="line">   <span class="attribute">height</span>: <span class="number">100px</span>;</div><div class="line">   <span class="attribute">background-color</span>: pink;     <span class="comment">/* 方便看效果 */</span></div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h1 id="display值的作用"><a href="#display值的作用" class="headerlink" title="display值的作用"></a>display值的作用</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line"></div><div class="line">block           块类型。默认宽度为父元素宽度，可设置宽高，换行显示。</div><div class="line">none            缺省值。象行内元素类型一样显示。</div><div class="line">inline          行内元素类型。默认宽度为内容宽度，不可设置宽高，同行显示。</div><div class="line">inline-block    默认宽度为内容宽度，可以设置宽高，同行显示。</div><div class="line">list-item       象块类型元素一样显示，并添加样式列表标记。</div><div class="line">table           此元素会作为块级表格来显示。</div><div class="line">inherit         规定应该从父元素继承 display 属性的值。</div></pre></td></tr></table></figure>
          <!--noindex-->
          <div class="post-button text-center">
            <a class="btn" href="/blog/2017/07/11/zj/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://rsl140.github.io/blog/blog/2017/06/20/git/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Summer">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/uploads/1.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="XiaoSi">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/blog/2017/06/20/git/" itemprop="url">
                  Contributions不显示(git)
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-06-20T12:23:00+08:00">
                2017-06-20
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/blog/2017/06/20/git/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count" data-disqus-identifier="2017/06/20/git/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>当我换到MAC得时候重新配置了git之后 Contributions 不显示了 后来搜了很多方法，今天终于解决。</p>
</blockquote>
<h2 id="原因：建立用户的时候用错了email-和github关联的email不一样-导致了Contributions不显示，值显示了新建repo的记录"><a href="#原因：建立用户的时候用错了email-和github关联的email不一样-导致了Contributions不显示，值显示了新建repo的记录" class="headerlink" title="原因：建立用户的时候用错了email 和github关联的email不一样 导致了Contributions不显示，值显示了新建repo的记录"></a>原因：建立用户的时候用错了email 和github关联的email不一样 导致了Contributions不显示，值显示了新建repo的记录</h2><p>进入repo 查看git log 日志发现 提交邮箱和关联邮箱不一致。</p>
<h2 id="方法一：添加这个邮箱到自己的github账户中"><a href="#方法一：添加这个邮箱到自己的github账户中" class="headerlink" title="方法一：添加这个邮箱到自己的github账户中"></a>方法一：添加这个邮箱到自己的github账户中</h2><p>进入自己的设置里 email选项中新增log下的邮箱。（这时会收到一个验证邮件，点击确认。）<br>返回主页后回发现Contributions出现了。</p>
<h2 id="方法二：修改提交记录中的邮箱为已被关联的邮箱-个人不太建议"><a href="#方法二：修改提交记录中的邮箱为已被关联的邮箱-个人不太建议" class="headerlink" title="方法二：修改提交记录中的邮箱为已被关联的邮箱(个人不太建议)"></a>方法二：修改提交记录中的邮箱为已被关联的邮箱(个人不太建议)</h2>
          <!--noindex-->
          <div class="post-button text-center">
            <a class="btn" href="/blog/2017/06/20/git/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://rsl140.github.io/blog/blog/2017/06/02/javaQuickKey/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Summer">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/uploads/1.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="XiaoSi">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/blog/2017/06/02/javaQuickKey/" itemprop="url">
                  Eclipse常用快捷键操作命令
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-06-02T10:23:32+08:00">
                2017-06-02
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/how-to-exit-vim/" itemprop="url" rel="index">
                    <span itemprop="name">how to exit vim</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/blog/2017/06/02/javaQuickKey/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count" data-disqus-identifier="2017/06/02/javaQuickKey/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>Eclipse常用快捷键</p>
</blockquote>
<p>Ctrl+1 快速修复(最经典的快捷键,就不用多说了)<br>Ctrl+D: 删除当前行<br>Ctrl+Alt+↓ 复制当前行到下一行(复制增加)<br>Ctrl+Alt+↑ 复制当前行到上一行(复制增加)<br>Alt+↓ 当前行和下面一行交互位置(特别实用,可以省去先剪切,再粘贴了)<br>Alt+↑ 当前行和上面一行交互位置(同上)<br>Alt+← 前一个编辑的页面<br>Alt+→ 下一个编辑的页面(当然是针对上面那条来说了)<br>Alt+Enter 显示当前选择资源(工程,or 文件 or文件)的属性<br>Shift+Enter 在当前行的下一行插入空行(这时鼠标可以在当前行的任一位置,不一定是最后)<br>
          <!--noindex-->
          <div class="post-button text-center">
            <a class="btn" href="/blog/2017/06/02/javaQuickKey/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://rsl140.github.io/blog/blog/2017/05/24/vim/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Summer">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/uploads/1.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="XiaoSi">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/blog/2017/05/24/vim/" itemprop="url">
                  mac 命令行记录
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-05-24T09:23:32+08:00">
                2017-05-24
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/blog/2017/05/24/vim/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count" data-disqus-identifier="2017/05/24/vim/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>命令行笔记</p>
</blockquote>
<h1 id="how-to-exit-vim？据说有1kk-的人搜索"><a href="#how-to-exit-vim？据说有1kk-的人搜索" class="headerlink" title="how to exit vim？据说有1kk+的人搜索"></a>how to exit vim？据说有1kk+的人搜索</h1><p>Hit the Esc key; vim goes into command mode. Then you can type</p>
<p><code>:q</code> to quit (short for :quit) 退出<br><code>:q!</code> to quit without saving (short for :quit!) 不保存退出<br><code>:wq</code> to write and quit (think write and quit) 编辑退出<br><code>:wq!</code> to write and quit even if file has only read permission (if file does not have write permission: force write) 只读模式编辑退出<br><code>:x</code> to write and quit (similar to :wq, but won’t write if there are no changes)<br><code>:qa</code> to quit all (short for :quitall)<br>When you press :, a : will appear at the bottom of the screen.</p>
<p>Or you can press Esc <code>ZZ</code> (Esc <code>Shift+Z</code> <code>Shift+Z</code>) to write/save if the file was changed, then quit.</p>
<p>Or if you don’t want to save changes you can use ZQ instead.</p>
<p>Vim has extensive help, so type Esc:<code>help Return</code> and you will have all your answers and even a neat tutorial.</p>
<p>来源：How to exit the Vim editor?<br>
          <!--noindex-->
          <div class="post-button text-center">
            <a class="btn" href="/blog/2017/05/24/vim/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://rsl140.github.io/blog/blog/2017/05/09/PATH/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Summer">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/uploads/1.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="XiaoSi">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/blog/2017/05/09/PATH/" itemprop="url">
                  mac for command not found
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-05-09T15:49:57+08:00">
                2017-05-09
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/path/" itemprop="url" rel="index">
                    <span itemprop="name">path</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/blog/2017/05/09/PATH/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count" data-disqus-identifier="2017/05/09/PATH/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>装环境java环境变量后导致全局环境变量没有了，以下为解决方法</p>
</blockquote>
<h1 id="在命令行中输入"><a href="#在命令行中输入" class="headerlink" title="在命令行中输入"></a>在命令行中输入</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line">1.export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/<span class="built_in">local</span>/bin:<span class="variable">$PATH</span> <span class="comment">#这样可以保证命令行暂时可以使用。关闭终端后再使用就不行了。</span></div><div class="line"></div><div class="line">2.cd ~/ <span class="comment">#进入当前用户的home目录</span></div><div class="line"></div><div class="line">3.touch .bash_profile <span class="comment"># 创建bash_profile执行命令</span></div><div class="line"></div><div class="line">4.open .bash_profile <span class="comment"># 打开并编辑bash_profile</span></div><div class="line"></div><div class="line">5.在打开的记事本中会显示之前配置的path 保存文档</div><div class="line"></div><div class="line">6.source .bash_profile <span class="comment"># 更新命令 命令行(终端)要保持不要关闭</span></div></pre></td></tr></table></figure>
          <!--noindex-->
          <div class="post-button text-center">
            <a class="btn" href="/blog/2017/05/09/PATH/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://rsl140.github.io/blog/blog/2017/05/09/java/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Summer">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/uploads/1.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="XiaoSi">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/blog/2017/05/09/java/" itemprop="url">
                  java
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-05-09T15:48:26+08:00">
                2017-05-09
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/blog/2017/05/09/java/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count disqus-comment-count" data-disqus-identifier="2017/05/09/java/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <blockquote>
<p>java 培训笔记</p>
</blockquote>
<h1 id="第三章"><a href="#第三章" class="headerlink" title="第三章"></a>第三章</h1><h2 id="Scanner"><a href="#Scanner" class="headerlink" title="Scanner"></a>Scanner</h2><p>重点：Scanner input= new Scanner(System.in) 在整个程序里面，只用写一次就可以了。然后input可以对于任意输出来进行调用。<br>input.close();//清除input里面的值</p>
<h2 id="boolean（布尔）类型"><a href="#boolean（布尔）类型" class="headerlink" title="boolean（布尔）类型"></a>boolean（布尔）类型</h2><p>boolean类型的值<br>真：true<br>假：false<br>例如：boolean isTiaoJian1=javaScore&gt;98 &amp;&amp; musicScore &gt;80;<br>例如命名：boolean isBig<br>注：需要注意的一点是，boolean在命名的时候开头需要用is</p>
<h2 id="if结构"><a href="#if结构" class="headerlink" title="if结构"></a>if结构</h2><p>多重if执行结构为1次或0次，不会执行更多的次数。所以多重if需要遵循从前往后的执行顺序。</p>
<p>在if里面，如果是字符串char和String进行比较的话，需要使用equals方法<br>例如：if(sex.equals(“男”))<br>当如果需要对常量和变量进行比较的时候，需要把常量写在前面，变量写后面<br>例如：if(“男”.equals(sex))</p>
<h2 id="switch中可以使用的数据类型："><a href="#switch中可以使用的数据类型：" class="headerlink" title="switch中可以使用的数据类型："></a>switch中可以使用的数据类型：</h2><ol>
<li>char、short、int、long、bool 基本类型都可以用于switch语句。 2. float、double都不能用于switch语句。 3. enum类型,即枚举类型可以用于switch语句。4.String可以用于switch语句，但是限定于jdk1.7版本以上</li>
</ol>
          <!--noindex-->
          <div class="post-button text-center">
            <a class="btn" href="/blog/2017/05/09/java/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
          <!--/noindex-->
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
  </section>

  
  <nav class="pagination">
    <a class="extend prev" rel="prev" href="/blog/"><i class="fa fa-angle-left"></i></a><a class="page-number" href="/blog/">1</a><span class="page-number current">2</span><a class="page-number" href="/blog/page/3/">3</a><a class="extend next" rel="next" href="/blog/page/3/"><i class="fa fa-angle-right"></i></a>
  </nav>



          </div>
          


          

        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      

      <section class="site-overview sidebar-panel sidebar-panel-active">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/blog/uploads/1.jpg"
               alt="Summer" />
          <p class="site-author-name" itemprop="name">Summer</p>
           
              <p class="site-description motion-element" itemprop="description">小思</p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/blog/archives/">
                <span class="site-state-item-count">27</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-categories">
              <a href="/blog/categories/index.html">
                <span class="site-state-item-count">8</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/blog/tags/index.html">
                <span class="site-state-item-count">17</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="http://github.com/rsl140" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://segmentfault.com/u/xiaosi_58ec6bdf9eaab" target="_blank" title="Segmentfault">
                  
                    <i class="fa fa-fw fa-globe"></i>
                  
                  Segmentfault
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Summer</span>
</div>

        
<div class="busuanzi-count">
  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv">
      <i class="fa fa-user">本站访客数</i>
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
      人次
    </span>
  

  
    <span class="site-pv">
      <i class="fa fa-eye">本站总访问量</i>
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
      次
    </span>
  
</div>


        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  



  
  <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>

  
  <script type="text/javascript" src="/blog/lib/canvas-nest/canvas-nest.min.js"></script>


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.0"></script>



  
  

  

  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.0"></script>



  



  

    <script type="text/javascript">
      var disqus_shortname = 'xiaosi';
      var disqus_identifier = 'page/2/index.html';

      var disqus_title = "";


      function run_disqus_script(disqus_script) {
        var dsq = document.createElement('script');
        dsq.type = 'text/javascript';
        dsq.async = true;
        dsq.src = '//' + disqus_shortname + '.disqus.com/' + disqus_script;
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
      }

      run_disqus_script('count.js');

      

    </script>
  













  





  

  

  

  

</body>
</html>
